    # PowerShell script equivalent of the provided Bash script

    # Function to check if a directory exists
    function dir_exists__32_v0 {
        param (
            [string]$path
        )
        if (Test-Path -Path $path -PathType Container) {
            $global:__AF_dir_exists32_v0 = 1
        } else {
            $global:__AF_dir_exists32_v0 = 0
        }
    }

    # Function to create a directory
    function dir_create__38_v0 {
        param (
            [string]$path
        )
        dir_exists__32_v0 $path
        if ($global:__AF_dir_exists32_v0 -eq 0) {
            New-Item -ItemType Directory -Path $path -Force | Out-Null
        }
    }

    # Function to check if a command exists
    function is_command__93_v0 {
        param (
            [string]$command
        )
        if (Get-Command $command -ErrorAction SilentlyContinue) {
            $global:__AF_is_command93_v0 = 1
        } else {
            $global:__AF_is_command93_v0 = 0
        }
    }

    # Function to download a file
    function file_download__135_v0 {
        param (
            [string]$url,
            [string]$path
        )
        is_command__93_v0 "curl"
        $curl_exists = $global:__AF_is_command93_v0
        is_command__93_v0 "wget"
        $wget_exists = $global:__AF_is_command93_v0
        is_command__93_v0 "aria2c"
        $aria2c_exists = $global:__AF_is_command93_v0

        if ($curl_exists -eq 1) {
            curl -L -o $path $url
        } elseif ($wget_exists -eq 1) {
            wget $url -O $path
        } elseif ($aria2c_exists -eq 1) {
            aria2c $url -d (Split-Path $path -Parent) -o (Split-Path $path -Leaf)
        } else {
            $global:__AF_file_download135_v0 = 0
            return
        }
        $global:__AF_file_download135_v0 = 1
    }

    # Function to uncompress .gz files
    function uncompress_gz {
        param (
            [string]$file_path
        )
        is_command__93_v0 "gzip"
        $gzip_exists = $global:__AF_is_command93_v0
        is_command__93_v0 "7z"
        $seven_zip_exists = $global:__AF_is_command93_v0

        if ($gzip_exists -eq 1) {
            # Use gzip to decompress
            gzip -d $file_path
        } elseif ($seven_zip_exists -eq 1) {
            # Use 7z to decompress
            7z x $file_path -o$(Split-Path $file_path -Parent)
        } else {
            Write-Host "No supported decompression tool found (gzip or 7z)."
            return
        }

        if ($LASTEXITCODE -ne 0) {
            Write-Host "Failed to uncompress file: $file_path"
        } else {
            Write-Host "Successfully uncompressed: $file_path"
        }
    }

    # Create the data directory
    dir_create__38_v0 "data"

    # Read URLs from data_urls.txt and process each line
    Get-Content "data_urls.txt" | ForEach-Object {
        $line = $_
        $file_name = [System.IO.Path]::GetFileName($line)
        if (-not $file_name) {
            Write-Host "Failed to get file name"
            return
        }
        Write-Host "Downloading: $file_name"
        file_download__135_v0 $line "data/$file_name"
        if ($global:__AF_file_download135_v0 -eq 1) {
            Write-Host "Uncompressing: data/$file_name"
            uncompress_gz "data/$file_name"
        }
    }
